/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import net.minecraft.block.BlockLadder;
/*     */ import net.minecraft.block.properties.IProperty;
/*     */ import net.minecraft.block.state.IBlockState;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraft.entity.EntityLivingBase;
/*     */ import net.minecraft.item.EnumAction;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import net.minecraft.util.EnumFacing;
/*     */ import net.minecraft.util.math.BlockPos;
/*     */ 
/*     */ public class qr<E extends EntityLivingBase>
/*     */   extends yv<E> {
/*     */   public float t;
/*     */   public float d;
/*     */   public float z;
/*     */   public float i;
/*  19 */   public float w = 0.0F;
/*     */   
/*     */   public boolean q = false;
/*     */   public boolean g = false;
/*     */   
/*     */   public qr(EntityLivingBase entityLivingBase) {
/*  25 */     super((E)entityLivingBase);
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*  30 */     this.t = 100.0F;
/*  31 */     this.d = 100.0F;
/*  32 */     this.z = 100.0F;
/*  33 */     this.i = 100.0F;
/*     */   }
/*     */ 
/*     */   
/*     */   public void h(boolean bool) {
/*  38 */     this.g = bool;
/*     */   }
/*     */   public float k() {
/*  41 */     return this.w;
/*     */   } public float d() {
/*  43 */     return this.t;
/*     */   } public float c() {
/*  45 */     return this.d;
/*     */   } public float s() {
/*  47 */     return this.z;
/*     */   } public float y() {
/*  49 */     return this.i;
/*     */   } public boolean k() {
/*  51 */     return this.g;
/*     */   }
/*     */ 
/*     */   
/*     */   public void v() {
/*  56 */     super.v();
/*     */     
/*  58 */     boolean bool = s();
/*  59 */     if ((bool & ((this.i == 0.0F) ? 1 : 0)) != 0) {
/*     */       
/*  61 */       s();
/*  62 */       this.i = true;
/*     */     } 
/*     */     
/*  65 */     if (((!bool ? 1 : 0) & this.i | ((this.m <= 0.0D && this.d - this.m > 0.4D && this.t > 2.0F) ? 1 : 0)) != 0) {
/*     */       
/*  67 */       y();
/*  68 */       this.i = false;
/*     */     } 
/*     */     
/*  71 */     if (d()) {
/*     */       
/*  73 */       this.w = (float)(this.w + this.d * 2.5999999046325684D);
/*  74 */       this.g = true;
/*     */     }
/*     */     else {
/*     */       
/*  78 */       this.g = false;
/*     */     } 
/*     */     
/*  81 */     if (((EntityLivingBase)this.j).field_82175_bq) {
/*     */       
/*  83 */       if (!this.q || this.z > 5.0F)
/*     */       {
/*  85 */         t();
/*  86 */         this.q = true;
/*     */       }
/*     */     
/*     */     } else {
/*     */       
/*  91 */       this.q = false;
/*     */     } 
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public void v(float f) {
/*  98 */     if (t()) {
/*     */       
/* 100 */       this.d += hq.g;
/*     */     }
/*     */     else {
/*     */       
/* 104 */       this.t += hq.g;
/*     */       
/* 106 */       if (this.d < 0.0D) {
/*     */         
/* 108 */         this.i += hq.g;
/*     */       }
/*     */       else {
/*     */         
/* 112 */         this.i = 0.0F;
/*     */       } 
/*     */     } 
/*     */     
/* 116 */     this.z += hq.g;
/*     */   }
/*     */ 
/*     */   
/*     */   public void s() {
/* 121 */     this.d = 0.0F;
/* 122 */     this.i = 0.0F;
/*     */   }
/*     */ 
/*     */   
/*     */   public void y() {
/* 127 */     this.t = 0.0F;
/*     */   }
/*     */ 
/*     */   
/*     */   public void t() {
/* 132 */     this.z = 0.0F;
/*     */   }
/*     */ 
/*     */   
/*     */   public float t() {
/* 137 */     return v().func_185119_l() + 180.0F;
/*     */   }
/*     */ 
/*     */   
/*     */   public EnumFacing v() {
/* 142 */     BlockPos blockPos = new BlockPos(Math.floor(((EntityLivingBase)this.j).field_70165_t), Math.floor(((EntityLivingBase)this.j).field_70163_u), Math.floor(((EntityLivingBase)this.j).field_70161_v));
/*     */     
/* 144 */     IBlockState iBlockState1 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos);
/* 145 */     IBlockState iBlockState2 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, -1, 0));
/* 146 */     IBlockState iBlockState3 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, -2, 0));
/*     */     
/* 148 */     if (iBlockState1.func_177230_c() instanceof BlockLadder) return (EnumFacing)iBlockState1.func_177229_b((IProperty)BlockLadder.field_176382_a); 
/* 149 */     if (iBlockState2.func_177230_c() instanceof BlockLadder) return (EnumFacing)iBlockState2.func_177229_b((IProperty)BlockLadder.field_176382_a); 
/* 150 */     if (iBlockState3.func_177230_c() instanceof BlockLadder) return (EnumFacing)iBlockState3.func_177229_b((IProperty)BlockLadder.field_176382_a); 
/* 151 */     return EnumFacing.NORTH;
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean d() {
/* 156 */     if (this.j == null || ((EntityLivingBase)this.j).field_70170_p == null) {
/* 157 */       return false;
/*     */     }
/* 159 */     BlockPos blockPos = new BlockPos(Math.floor(((EntityLivingBase)this.j).field_70165_t), Math.floor(((EntityLivingBase)this.j).field_70163_u), Math.floor(((EntityLivingBase)this.j).field_70161_v));
/*     */     
/* 161 */     IBlockState iBlockState1 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos);
/* 162 */     IBlockState iBlockState2 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, -1, 0));
/* 163 */     IBlockState iBlockState3 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, -2, 0));
/*     */     
/* 165 */     return (((EntityLivingBase)this.j).func_70617_f_() && !t() && (iBlockState1.func_177230_c() instanceof BlockLadder || iBlockState2.func_177230_c() instanceof BlockLadder || iBlockState3.func_177230_c() instanceof BlockLadder));
/*     */   }
/*     */ 
/*     */   
/*     */   public float z() {
/* 170 */     float f = (float)(((EntityLivingBase)this.j).field_70163_u + (((EntityLivingBase)this.j).field_70163_u - ((EntityLivingBase)this.j).field_70167_r) * hq.w);
/*     */     
/* 172 */     BlockPos blockPos = new BlockPos(Math.floor(((EntityLivingBase)this.j).field_70165_t), Math.floor(((EntityLivingBase)this.j).field_70163_u), Math.floor(((EntityLivingBase)this.j).field_70161_v));
/*     */     
/* 174 */     IBlockState iBlockState1 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, 2, 0));
/* 175 */     IBlockState iBlockState2 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, 1, 0));
/* 176 */     IBlockState iBlockState3 = ((EntityLivingBase)this.j).field_70170_p.func_180495_p(blockPos.func_177982_a(0, 0, 0));
/* 177 */     if (!(iBlockState1.func_177230_c() instanceof BlockLadder)) {
/*     */       
/* 179 */       if (!(iBlockState2.func_177230_c() instanceof BlockLadder)) {
/*     */         
/* 181 */         if (!(iBlockState3.func_177230_c() instanceof BlockLadder)) {
/* 182 */           return f - (int)f + 2.0F;
/*     */         }
/* 184 */         return f - (int)f + 1.0F;
/*     */       } 
/*     */ 
/*     */       
/* 188 */       return f - (int)f;
/*     */     } 
/*     */ 
/*     */     
/* 192 */     return -2.0F;
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean c() {
/* 197 */     if (((EntityLivingBase)this.j).func_184605_cv() > 0) {
/*     */       
/* 199 */       ItemStack itemStack1 = ((EntityLivingBase)this.j).func_184614_ca();
/* 200 */       ItemStack itemStack2 = ((EntityLivingBase)this.j).func_184592_cb();
/* 201 */       if ((!itemStack1.func_190926_b() && itemStack1.func_77975_n() == EnumAction.BOW) || (
/* 202 */         !itemStack2.func_190926_b() && itemStack2.func_77975_n() == EnumAction.BOW))
/*     */       {
/* 204 */         return true;
/*     */       }
/*     */     } 
/* 207 */     return false;
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public E v() {
/* 213 */     return this.j;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\qr.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */